// 给登录按钮添加点击事件，并判断输入框是否为空
$("#loginBtn").click(function (){
    var uid = $("#uid").val();
    var upwd = $("#upwd").val();

    if(uid.trim() =="" || uid == null){
        $("#msg").html("账号不可为空！");
        return;
    }
    if(uid.length >= 100){
        $("#msg").html("账号不可超过100字符！");
        return;
    }
    if(upwd.trim() == "" || upwd == null){
        $("#msg").html("密码不可为空！");
        return;
    }
    if(upwd.length >= 100){
        $("#msg").html("密码不可超过100字符！");
        return;
    }
    $("#loginform").submit();
});

$("#regBtn").click(function (){
    window.location.href = "register.jsp";
});